# Create your views here.
from django.views import View

from server.utils import Response, LoginRequiredPerson


class IsLoginView(LoginRequiredPerson, View):
    """ Check if the user is logged in """

    def get(self, request):
        return Response.Json(msg="User logged in", role=request.user.role)

    def post(self, request):
        return self.get(request)
